package com.sharding.service;

import com.sharding.entity.Account;
import com.sharding.mapper.AccountRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Desc:
 * Date:    2023/2/26
 *
 * @author WanYangWei
 */
@Service
public class AccountService {

    @Autowired
    private AccountRepository accountRepository;

    public int save(Account account) {
        return accountRepository.save(account);
    }

    public List<Account> selectAll() {
        return accountRepository.selectAll();
    }

    public Account selectById(long id) {
        return accountRepository.selectById(id);
    }
}
